<template>
  <div>
    <template v-if="$app.judgeData(orderInfo) && $app.judgeData(orLiInfo)">
      <Card>
        <div class="lineH34 c333 f_16 f_bold marginB10">作品信息</div>
        <div class="TJ_big paddingL30">
          <Row :gutter="15" class="TJ_box paddingB20">
            <Col :span="6" class="marginB10">
              <div>
                作品名称：
                <span class="cBlue">{{orderInfo.works_name}}</span>
              </div>
            </Col>
            <Col :span="6" class="marginB10">
              <div>作者姓名或名称：{{orderInfo.author_name}}</div>
            </Col>
            <Col :span="6" class="marginB10">
              <div>品署名：本名</div>
            </Col>
            <Col :span="6" class="marginB10">
              <div>发表状态：{{zrM(orderInfo.publish_state)}}</div>
            </Col>
            <Col :span="6" class="marginB10">
              <div>创作完成日期：{{orderInfo.finish_time}}</div>
            </Col>
            <Col :span="6" class="marginB10">
              <div>创作完成地点：中国 - {{orderInfo.city}}</div>
            </Col>
            <template v-if="orderInfo.publish_state==1">
              <Col :span="6" class="marginB10">
                <div>首次发表日期：{{orderInfo.publish_time}}</div>
              </Col>
              <Col :span="6" class="marginB10">
                <div>首次发表地点：中国 - {{orderInfo.publish_city}}</div>
              </Col>
            </template>
            <Col :span="6" class="marginB10">
              <div>作品类别：美术</div>
            </Col>
            <Col :span="6" class="marginB10">
              <div>作品原创性质：原创</div>
            </Col>
          </Row>
        </div>

        <div class="lineH34 c333 f_16 f_bold marginB10">权利说明</div>
        <div class="TJ_big paddingL30">
          <Row :gutter="15" class="TJ_box paddingB20">
            <Col :span="6" class="marginB10">
              <div>取得方式：原创</div>
            </Col>
            <Col :span="8" class="marginB10">
              <div>权利归属方式及其说明：{{orderInfo.right_gs_desc}}</div>
            </Col>
            <Col :span="8">
              <div>权利拥有状况及其说明：全部</div>
            </Col>
          </Row>
        </div>

        <div class="lineH34 c333 f_16 f_bold marginB10">其他信息</div>
        <div class="TJ_big paddingL30">
          <Row :gutter="15" class="TJ_box">
            <Col :span="6">
              <div class="JC_img borderNone pointer relative marginB10" style="width:120px;">
                <img
                  :src="$app.judgeData(orderInfo.works_file_path) && orderInfo.works_file_path.file_url"
                  class="cover height100 width100 marginB10"
                  @click="$app.openWindow(orderInfo.works_file_path.file_url)"
                />
              </div>
              <div style="width:120px;" class="textCenter">作品图样</div>
            </Col>
            <Col :span="8" class="marginB10">
              <div class="marginB10">
                <span
                  class="textLine f_18 cBlue textLine"
                  @click="$app.openWindow(orderInfo.desc_word_file_path.file_url)"
                >
                  <i
                    class="iconfont marginR5 f_24"
                    :class="$app.judgeData(orderInfo.desc_word_file_path) && $app.fileIcon(orderInfo.desc_word_file_path)"
                  ></i>
                  说明文档
                </span>
              </div>
              <div class="marginB10">
                <span class="textLine f_18 cBlue textLine" @click="gwerN(1)">
                  <i class="iconfont marginR5 f_24 iconword"></i>
                  代理委托书
                </span>
              </div>
              <div class="marginB10" v-show="orderInfo.right_gs_desc!='个人作品'">
                <span class="textLine f_18 cBlue textLine" @click="gwerN(2)">
                  <i class="iconfont marginR5 f_24 iconword"></i>
                  作品权属证明
                </span>
              </div>
            </Col>
            <Col :span="8" class="marginB10">
              <div>纸介质：A4(打印纸)共1张</div>
            </Col>
          </Row>
        </div>
      </Card>
    </template>
  </div>
</template>



<script>
export default {
  name: "middle",
  components: {},
  props: ["orderInfo", "orLiInfo"],
  data() {
    let data = {};
    let tool = {};
    return Object.assign(data, tool);
  },
  mounted() {},
  methods: {
    zrM(num) {
      let out = "";
      switch (parseInt(num)) {
        case 0:
          out = "未发表";
          break;
        case 1:
          out = "已发表";
          break;
      }

      return out;
    },
    //代理委托书
    gwerN(who) {
      let {
        orderInfo: {
          works_name,
          people_info: { people_name }
        }
      } = this;

      $ajax.workAC(who, people_name, works_name, resData => {
        $app.openWindow(resData.file_url);
      });
    }
  }
};
</script>

